$(function() {
	//提交修改
	$("#allPay").click(function() {
		var data = 'payMonth=all';
		//$("#sub_btn").button("loading");
		$.post('/wx/property/payment/data', data, function(result) {
			//$("#sub_btn").button("reset");
			if (result.resultCode == "0") {
				location.href="/wx/property/order/pay?payAmount="+ result.payAmount + '&orderNo=' + result.orderNo;
				//setTimeout('location.href="javascript:history.back();"', 1000);
			} else {
				$("#errmsg").text(result.datas);
				$('#my-alert').modal({
					relatedTarget: this,
				});
			}
		});
	});
});

/**
 * [paymentData description]
 * @return {[type]} [description]
 */
function paymentData(month) {
	var data = 'payMonth=' + month;
	$.post('/wx/property/payment/data', data, function(result) {
		if (result.resultCode == "0") {
			location.href="/wx/property/order/pay?payAmount="+ result.payAmount + '&orderNo=' + result.orderNo;
		} else {
			$("#errmsg").text(result.datas);
			$('#my-alert').modal({
				relatedTarget: this,
			});	
		}
	});


}
